import axios from 'axios'

const API_BASE_URL = 'http://localhost:9527/api'

export function chatWithLoveAppSse(message, chatId) {
  const url = `${API_BASE_URL}/ai/love_app/chat/sse?message=${encodeURIComponent(message)}${chatId ? `&chatId=${encodeURIComponent(chatId)}` : ''}`;
  
  // 创建并返回EventSource
  return new EventSource(url);
}

export function chatWithManus(message) {
  const url = `${API_BASE_URL}/ai/manus/chat?message=${encodeURIComponent(message)}`;
  return new EventSource(url);
} 